<?php

use Faker\Generator as Faker;

/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(\App\Models\OpenWechat\Authorizer::class, function (Faker $faker) {
    $name = $faker->name;

    return [
        'authorizer_refresh_token' => $faker->uuid,
        'authorizer_appid'         => $faker->uuid,
        'func_info'                => [],
        'nick_name'                => $name,
        'nick_name_unicode'        => json_encode($name),
        'head_img'                 => $faker->url,
        'service_type_info'        => \App\Models\OpenWechat\Authorizer::SERVICE_TYPE_INFO_SERVICE,
        'verify_type_info'         => 0,
        'user_name'                => $faker->uuid, // gh_12312312
        'alias'                    => $faker->name,
        'qrcode_url'               => $faker->url,
        'business_info'            => [
            "open_pay"   => 1,
            "open_shake" => 0,
            "open_scan"  => 0,
            "open_card"  => 1,
            "open_store" => 0,
        ],
        'idc'                      => $faker->randomDigit,
        'principal_name'           => $faker->name,
        'signature'                => $faker->uuid,
        'canceled'                 => \App\Models\OpenWechat\Authorizer::STATUS_AUTH,
        'auth_code'                => $faker->uuid
    ];
});
